#pragma once
#include "ros/ros.h"
#include "std_msgs/String.h"
#include "iostream"
#include "fstream"

#include "task/task_handle_base.h"

namespace task
{
	class LocalHost : public TaskHandleBase
	{
	public:
		bool Init(std::string param_file) override;
        void Reset() override;
        void ReadData(sTaskReceive &task_cmd) override;
        void WriteData(std::string write_mode, sAMRState &amr_state, unsigned int _SN) override;
        void WriteData(std::string write_mode, sAMRState &amr_state) override;
        void WriteData(std::string write_mode, std::string file_path) override;

	private:
		void LoadConfigParam(std::string param_file);
		std::ifstream ifile_;
		int task_id_;
		std::string task_file_path_;
		int task_num_;
		task_msgs::task_msg task_;
		unsigned int SN_line_;
		uint16_t task_id_cnt_;
	};
} // namespace task